from django.urls import path, re_path

from utilities.path_re import PATH_RE_ID
from apps.warn_center.views import (
    ListWarnings,
    InboxMailBatchHandle,
    InboxMailBatchAllHandle,
    ListInboxMails,
    ListReceivers,
    ReceiversHandle,
    WarnEmailHandle,
    WarnEmailTest,
    WarnSummaryRecentWeek,
    WarnSummaryRecentDay,
    WarnNepMapHandle
)

urlpatterns = [
    path(r'list/', ListWarnings.as_view()),
    path(r'mail/status/', InboxMailBatchHandle.as_view()),
    path(r'mail/list/', ListInboxMails.as_view()),
    path(r'mail/del/', InboxMailBatchHandle.as_view()),
    path(r'mail/update-all/', InboxMailBatchAllHandle.as_view()),
    path(r'mail/del-all/', InboxMailBatchAllHandle.as_view()),
    path(r'receiver/list/', ListReceivers.as_view()),
    path(r'receiver/del/', ReceiversHandle.as_view()),
    re_path(rf"receiver/add/", ReceiversHandle.as_view()),
    re_path(rf"receiver/{PATH_RE_ID}/", ReceiversHandle.as_view()),
    path(r"email/test/", WarnEmailTest.as_view()),
    path(r"email/", WarnEmailHandle.as_view()),
    path(r"summary/week/", WarnSummaryRecentWeek.as_view()),
    path(r"summary/day/", WarnSummaryRecentDay.as_view()),
    path(r"netmap/", WarnNepMapHandle.as_view())
]
